//
//  KHHLunboNextViewController.m
//  Travel
//
//  Created by dllo on 15/11/30.
//  Copyright © 2015年 doll. All rights reserved.
//

#import "KHHLunboNextViewController.h"

@interface KHHLunboNextViewController ()<UIWebViewDelegate>

@property (nonatomic, strong)UIWebView *WebView;
@property (nonatomic, strong)UIActivityIndicatorView *activity;

@end

@implementation KHHLunboNextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self createWebView];
    
  //  [self createActivity];

}

#pragma mark - 创建webView
- (void)createWebView
{
    self.WebView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 00, WIDTH, HEIGHT)];
    self.WebView.delegate = self;
    self.WebView.backgroundColor = [UIColor whiteColor];
    
    
    UIView *vi = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 20)];
    vi.backgroundColor = [UIColor whiteColor];
    [self.WebView addSubview:vi];
    
    
    
    
    NSURLRequest *request = [[NSURLRequest alloc]initWithURL:[NSURL URLWithString:self.urlStr]];
    [self.WebView loadRequest:request];
    
    [self.view addSubview:self.WebView];
    
    
    
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setFrame:CGRectMake(10, 20, 30, 30)];
    btn.backgroundColor = [UIColor grayColor];
    [self.WebView addSubview:btn];
    [btn setImage:[UIImage imageNamed:@"leftBack"] forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(go) forControlEvents:UIControlEventTouchUpInside];
    
    
}

//返回
- (void)go
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)viewWillAppear:(BOOL)animated
{
    self.navigationController.navigationBar.hidden = YES;
    self.tabBarController.tabBar.hidden = YES;
}
- (void)viewWillDisappear:(BOOL)animated
{
    self.navigationController.navigationBar.hidden = NO;
    self.tabBarController.tabBar.hidden = NO;
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
